From: kaf24@firebug.cl.cam.ac.uk Date: Tue, 20 Jun 2006 17:51:46 +0000 (+0100) Subject: [XEN] Xen always relinquishes VGA console to domain0 when domain0 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15921^2~10 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=295173e3ca11d3326447ca1d36510905f7136d3e;p=xen.git [XEN] Xen always relinquishes VGA console to domain0 when domain0 starts to boot (previous behaviour looked for console=tty0 on dom0's command line). To prevent this 'console=vga[keep]' must be specified. Signed-off-by: Keir Fraser --- diff --git a/docs/src/user.tex b/docs/src/user.tex index abbc109be2..17f54020c1 100644 --- a/docs/src/user.tex +++ b/docs/src/user.tex @@ -1972,7 +1972,8 @@ editing \path{grub.conf}. \item [ console=$<$specifier list$>$ ] Specify the destination for Xen console I/O. This is a comma-separated list of, for example: \begin{description} - \item[ vga ] Use VGA console and allow keyboard input. + \item[ vga ] Use VGA console (only until domain 0 boots, unless {\bf + vga[keep] } is specified). \item[ com1 ] Use serial port com1. \item[ com2H ] Use serial port com2. Transmitted chars will have the MSB set. Received chars must have MSB set. diff --git a/xen/arch/ia64/xen/domain.c b/xen/arch/ia64/xen/domain.c index e42b3249de..1d85033061 100644 --- a/xen/arch/ia64/xen/domain.c +++ b/xen/arch/ia64/xen/domain.c @@ -855,9 +855,7 @@ int construct_dom0(struct domain *d, sprintf(si->magic, "xen-%i.%i-ia64", XEN_VERSION, XEN_SUBVERSION); si->nr_pages = max_pages; - /* Give up the VGA console if DOM0 is configured to grab it. */ - if (cmdline != NULL) - console_endboot(strstr(cmdline, "tty0") != NULL); + console_endboot(); printk("Dom0: 0x%lx\n", (u64)dom0); diff --git a/xen/arch/ia64/xen/xensetup.c b/xen/arch/ia64/xen/xensetup.c index 0ab92a0893..0f64691f4b 100644 --- a/xen/arch/ia64/xen/xensetup.c +++ b/xen/arch/ia64/xen/xensetup.c @@ -511,9 +511,8 @@ printk("About to call domain_create()\n"); printk("About to call init_trace_bufs()\n"); init_trace_bufs(); - /* Give up the VGA console if DOM0 is configured to grab it. */ #ifdef CONFIG_XEN_CONSOLE_INPUT /* CONFIG_SERIAL_8250_CONSOLE=n in dom0! */ - console_endboot(cmdline && strstr(cmdline, "tty0")); + console_endboot(); #endif domain0_ready = 1; diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 01a6ab8722..b78bcb21b8 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -598,8 +598,7 @@ void __init __start_xen(multiboot_info_t *mbi) init_trace_bufs(); - /* Give up the VGA console if DOM0 is configured to grab it. */ - console_endboot(cmdline && strstr(cmdline, "tty0")); + console_endboot(); /* Hide UART from DOM0 if we're using it */ serial_endboot(); diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index bbb9f89a33..309411b387 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -476,7 +476,11 @@ void init_console(void) if ( strncmp(p, "com", 3) == 0 ) sercon_handle = serial_parse_handle(p); else if ( strncmp(p, "vga", 3) == 0 ) + { vgacon_enabled = 1; + if ( strncmp(p+3, "[keep]", 6) == 0 ) + vgacon_enabled++; + } } init_vga(); @@ -502,7 +506,7 @@ void init_console(void) } } -void console_endboot(int disable_vga) +void console_endboot(void) { int i, j; @@ -532,8 +536,12 @@ void console_endboot(int disable_vga) printk("\n"); } - if ( disable_vga ) - vgacon_enabled = 0; + if ( vgacon_enabled ) + { + vgacon_enabled--; + printk("Xen is %s VGA console.\n", + vgacon_enabled ? "keeping" : "relinquishing"); + } /* * If user specifies so, we fool the switch routine to redirect input diff --git a/xen/include/xen/console.h b/xen/include/xen/console.h index b7232f305f..de95b7f769 100644 --- a/xen/include/xen/console.h +++ b/xen/include/xen/console.h @@ -15,7 +15,7 @@ void set_printk_prefix(const char *prefix); long read_console_ring(XEN_GUEST_HANDLE(char), u32 *, int); void init_console(void); -void console_endboot(int disable_vga); +void console_endboot(void); void console_force_unlock(void); void console_force_lock(void);